import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/HomeView.vue')
    },
    {
      path: '/book/group',
      name: 'bookGroup',
      component: () => import('../views/book/GroupView.vue')
    },
    {
      path: '/book/group/member/:groupId(\\d+)',
      name: 'bookMember',
      component: () => import('../views/book/GroupMemberView.vue')
    },
    {
      path: '/book/friend',
      name: 'bookFriend',
      component: () => import('../views/book/FriendView.vue')
    },
    {
      path: '/event',
      name: 'event',
      component: () => import('../views/EventView.vue')
    },
    {
      path: '/setting/config',
      name: 'settingConfig',
      component: () => import('../views/setting/configView.vue')
    },
    {
      path: '/plug',
      name: 'plug',
      component: () => import('../views/plug/listsView.vue')
    },
    {
      path: '/plug/setting/:className',
      name: 'pluginSetting',
      component: () => import('../views/plug/settingView.vue')
    },
  ]
})

export default router
